package it.csa.prova;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;

public class MainActivity extends Activity {

    public static final String EXTRA_MESSAGE = "";
    private static final String TAG= "MySimpleAppLogging";
    public static final String LOGIN="";

	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.i(TAG, "Si parte");
        setContentView(R.layout.activity_main);
    }

    /** Called when the user clicks the Send button */
    public void sendMessage(View view) {
        // Do something in response to button
    	Intent intent = new Intent(this, MenuActivity.class);
    	EditText loginText = (EditText) findViewById(R.id.loginText);
    	EditText passwordText = (EditText) findViewById(R.id.passwordText);
    	String username = loginText.getText().toString();
    	String password = passwordText.getText().toString();
    	intent.putExtra(LOGIN, username);
    	Log.i(TAG, "login e password "+username+ " "+password);
    	startActivity(intent);
    	//verifica login e password
    }
}